package org.example.controller;

import org.example.entity.Products;
import org.example.service.ProductsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProductsController {
    @Autowired
    private ProductsService productsService;
    //查询积分表所有内容
    @GetMapping("/productsList")
    public List<Products> getProducts() {
        return productsService.list();
    }
}
